import { Component } from '@angular/core';
import {PageBoxComponent} from "../../components/page-box/page-box.component";
import {ContactUsComponent} from "../../components/contact-us/contact-us.component";
import {LineGradientBoxComponent} from "../../components/line-gradient-box/line-gradient-box.component";
import {GrayBoxComponent} from "../../components/gray-box/gray-box.component";
import {SustainabilitySwiperSlideComponent} from "../../components/sustainability-swiper-slide/sustainability-swiper-slide.component";
import {PageTopPicComponent} from "../../components/page-top-pic/page-top-pic.component";
import {GlobalService} from "../../services/global.service";

@Component({
  selector: 'app-sustainability',
  standalone: true,
  imports: [
    PageBoxComponent,
    ContactUsComponent,
    LineGradientBoxComponent,
    GrayBoxComponent,
    SustainabilitySwiperSlideComponent,
    PageTopPicComponent
  ],
  templateUrl: './sustainability.component.html',
  styleUrl: './sustainability.component.scss'
})
export class SustainabilityComponent {
  ngAfterViewInit(): any {
    setTimeout(() => {
      const mySwiper = new Swiper('#sustainabilitySwiper', {
        autoplay: {
          delay: 5000,
          speed: 800,
          disableOnInteraction: false,
        },
        loop: true, // 循环模式选项
        autoHeight: true,
      })
    });
  }

  protected readonly GlobalService = GlobalService;
}
